package com.mayuanfei.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * TODO 类描述
 *
 * @author 老马
 * @date 2023-04-04 14:44
 */
@Controller
public class MyController {

    @RequestMapping("/test")
    public String test() {
        return "index.jsp";
    }

    /**
     * 抛出ArithmeticException异常
     */
    @RequestMapping("/test1")
    public String test1() {
        int i = 1/0;
        return "index.jsp";
    }

    /**
     * 抛出NullPointerException异常
     */
    @RequestMapping("/test2")
    public String test2() {
        String str = null;
        int length = str.length();
        return "index.jsp";
    }

}